#include "labelResultWarningInfo.h"

LabelResultInfo::LabelResultInfo(QWidget* parent)
{
    this->setParent(parent);
    this->setGeometry(0, 0, width(), height());


    _text = new QLabel("AL: E不合格 R不合格", this);
    _image = new QLabel(this);
    this->setStyleSheet("background-color: transparent");
    this->setLayout(new QHBoxLayout(this));
    this->layout()->setMargin(2);
    this->layout()->setSpacing(20);
    _image->setMinimumSize(QSize(24, 24));
    _image->setMaximumSize(QSize(24, 24));
    _image->setPixmap(QPixmap(":/pic/picture/info3.png"));

    this->layout()->addWidget(_image);
    this->layout()->addWidget(_text);
}

void LabelResultInfo::paintEvent(QPaintEvent *event){
    QPainter painter(this);
    painter.setPen(Qt::NoPen);
    painter.setBrush(QColor(255, 249, 241));
    painter.drawRect(rect());
}

void LabelResultInfo::setText(QString text){
    _text->setText(text);
}



